<?php
require ("../../../configuracion.php");
require ("../../../db.php");

$IdColonia = $_GET['Id'];
$IdPregunta = $_GET['IdPregunta'];
$SelectColonia = mssql_query("SELECT st_Colonia FROM ".$ecrmDB."..cat_Colonias WHERE id_Colonia = '$IdColonia'");
$rowColonia = mssql_fetch_array($SelectColonia);
$SelectCpostal = mssql_query("SELECT st_CPostal FROM ".$ecrmDB."..cat_CPostal WHERE id_Colonia = ".$IdColonia);
if($rowCpostal = mssql_fetch_array($SelectCpostal)) {

?>
<tr class="fondoBlanco">
<td>&nbsp;</td>
<td><a href="javascript:window.opener.document.Guion.colonia64.value ='<?=utf8_encode(strtoupper($rowColonia['st_Colonia']))?>';
javascript:window.opener.document.Guion.codigopostal64.value ='<?=$rowCpostal['st_CPostal']?>'; javascript:window.close();"><?=$rowCpostal['st_CPostal']?></a></td><br>
</tr>	
  
 <?php
}else{
 ?>

  <label>C.P. :&nbsp;&nbsp;&nbsp;&nbsp;</label><a href="javascript:window.close();">No hay codigo postal</a><br>
  
  <!--<select name="cpostal" id="codigo" >
        <option value="9999">No hay codigo postal</option>
		</select>-->
<?php
}
?>